<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        height: 300px;
        border: solid;
        margin: 20px;
        font-size: 3rem;
        display: flex;
        justify-content: center;
        align-items: center;
      }
    </style>
  </head>
  <body style="background-color: yellow">
    <div>div1</div>
    <div>div2</div>
    <!-- <div>div3</div> -->
    <!-- <div>div4</div>
    <div>div5</div>
    <div>div6</div>
    <div>div7</div>
    <div>div8</div> -->
    <script>
      console.log(
        document.documentElement.clientWidth,
        document.documentElement.clientHeight
      );
      console.log(window.innerWidth, window.innerHeight);
      //----
      // body
      console.log(document.body.scrollWidth, document.body.scrollHeight);
      console.log(
        document.documentElement.scrollWidth,
        document.documentElement.scrollHeight
      );
    </script>
  </body>
</html>
